<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="author" th:content="${settings.info_label_nickname}" />
    <meta name="description" th:content="${settings.seo_description}" />
    <meta name="keywords" th:content="${settings.seo_keyword}" />
    <link rel="shortcut icon" href="/static/assets/img/favicon.png">
    <link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/plugins/animate/animate.min.css">
    <link rel="stylesheet" href="/static/assets/css/style.css">
    <link rel="stylesheet" href="/static/assets/css/layui-theme-nbv5.css">
    <link rel="stylesheet" href="/static/plugins/pushbar/pushbar.css">
    <link rel="stylesheet" href="/static/assets/css/simple.css">
    <link rel="stylesheet" href="/static/assets/css/ubs.css">
    <title th:text="${nbv5su!=null?nbv5su.nickname:''}+'用户中心'"></title>
</head>
<body class="layui-anim layui-anim-fadein simple">
<!--顶部导航栏-->
<div th:replace="frontend/fragment/header (cur='ubs')"></div>

<!--顶部文字-->
<div class="layui-container top-block">
    <blockquote class="layui-elem-quote">
        <span class="layui-breadcrumb">
            <a href="/">网站首页</a>
            <a href="/ubs/token/comment">我的评论</a>
        </span>
        <div class="clock layui-show-md-inline-block layui-show-lg-inline-block layui-hide-xs layui-hide-sm">
            <span class="clock-font">当前日期</span>：<span id="current-datetime"></span>
        </div>
    </blockquote>
</div>

<!--内容文章正体-->
<div id="main-body" class="layui-container layui-mt20" style="margin-bottom: 30px;">
    <div class="layui-row layui-col-space20">
        <div class="layui-col-md2 layui-hide-sm layui-hide-xs layui-show-md-inline-block left-nav">
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item">
                    <a href="/login?redirectUrl=/ubs/token/index"><i class="fa fa-user-secret"></i> 用户中心</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/ubs/token/message"><i class="fa fa-envelope"></i> 我的消息</a>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="/ubs/token/comment" class="layui-this"><i class="fa fa-comment"></i> 我的评论</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/ubs/token/purchase"><i class="fa fa-shopping-cart"></i> 我的购买</a>
                </li>
            </ul>

        </div>
        <div class="layui-col-md10 right-nav animated fadeInUp">
            <div class="layui-card">
                <div class="layui-card-body" style="padding: 30px;">
                    <blockquote class="layui-elem-quote"
                                th:text="'Hi!,'+${nbv5su.nickname}+'。'+${settings.ubs_top_notice}"></blockquote>
                    <hr class="layui-mt20">
                    <div class="layui-row layui-mt20">
                        <div id="comment-table" class="layui-table"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<!--底部导航栏-->
<div th:replace="frontend/fragment/footer"></div>
<!--移动设备菜单导航-->
<div th:replace="frontend/fragment/mobile_nav"></div>

<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="/static/plugins/layui/layui.js"></script>
<script src="/static/assets/js/svg.js"></script>
<script src="/static/plugins/jquery/jquery-2.1.4.min.js"></script>
<script src="/static/assets/js/script.js"></script>
<script src="/static/assets/js/nbv5.js"></script>
<script src="/static/plugins/hc-sticky/hc-sticky.min.js"></script>
<script src="/static/plugins/pushbar/pushbar.js"></script>
<script th:inline="javascript">
    $(function () {
        window.addEventListener("scroll", nbv5front.headerScroll());
        nbv5front.miniHeader("main-body");
        new Pushbar({
            blur: true,
            overlay: true
        });


        layui.use(['layer', 'element', 'table'], function () {
            var layer = layui.layer,
                element = layui.element,
                table = layui.table;
            element.render();

            var nbv5su = [[${nbv5su}]];

            nbv5front.miniHeaderNavBtn(layer);

            table.render({
                elem: '#comment-table'
                , url: '/ubs/token/comment/' + nbv5su.id
                , page: true
                , limit: 10
                , height: 'full'
                , method: 'post'
                , request: {
                    pageName: 'current' //页码的参数名称，默认：page
                    , limitName: 'size' //每页数据量的参数名，默认：limit
                }
                , cols: [
                    [
                        {
                            field: 'articleId', title: '文章', templet: function (d) {
                                return '<a href="/article/' + d.articleId + '" target="_blank" style="color: #f6695e;">' + d.title + '</a>';
                            }
                        }
                        , {field: 'id', title: '楼层', width: 80}
                        , {field: 'clearComment', minWidth: 300, title: '评论内容', event: 'detail'}
                        , {
                        field: 'post', title: '评论时间', sort: true, width: 150, templet: function (d) {
                            return nbv5front.formatDate(d.post, 'yy/MM/dd HH:mm:ss');
                        }
                    }
                    ]
                ]
            });

        });

    });
</script>
</body>
</html>